<!DOCTYPE html>
<html>
<head>
	<title>借用构造函数</title>
</head>
<body>
<script type="text/javascript">

/*
	1. 借用构造函数只能继承函数中的属性和方法
*/
	
function Person(name) {
	this.name = name;
}
Person.prototype.say = function() {
	console.log(this.name);
}

function Student(name) {
	Person.call(this, name);
}
let student = new Student('name');
console.log(student.name);

</script>
</body>
</html>